package com.example.day19_7_19_1;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.webkit.WebChromeClient;
import android.webkit.WebView;

import com.example.day19_7_19_1.adapter.InfoRclAdapter;
import com.example.day19_7_19_1.base.BaseActivity;
import com.example.day19_7_19_1.base.BasePresenter;

import org.greenrobot.eventbus.Subscribe;

public class WebActivity extends BaseActivity {

    private WebView mWeb;

    @Override
    protected BasePresenter getPresenter() {
        return null;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected int getLayout() {
        return R.layout.activity_web;
    }

    private static final String TAG = "WebActivity";
    @Override
    protected void initView() {
        mWeb = (WebView) findViewById(R.id.web);
        Intent intent = getIntent();
        String url = intent.getStringExtra("url");
        Log.i(TAG, "initView: " + url);
        mWeb.loadUrl(url);
        mWeb.setNetworkAvailable(true);
        mWeb.setWebChromeClient(new WebChromeClient());
    }
}
